import Ciallo from "@/api/Ciallo";
// 
export default function Ciallo1API(Mode) {
    const datas = arguments;
    const paths = [
        "/parentDirectoryListAll",
        "/addparent",
        "/updateparent",
        "/deleteparent",
    ]
    const fns = {
        "/parentDirectoryListAll": new Map([['page', datas[1]], ['limit',datas[2]], ['name',datas[3]]]),
        "/addparent":new Map([["name",datas[1]]]),
        "/updateparent":new Map([["id",datas[1]],["name",datas[2]]]),
        "/deleteparent":new Map([["ids",datas[1]]]),
    }
    const url = paths[Mode];
    const data = {}
    fns[url].forEach((k, v) => {Reflect.set(data,v,k)})
    return Ciallo({
        url: url,
        method: "post",
        params: { ...data }
    })
}